<div data-role="page">
<div data-role="navbar">
	<ul>
		<li><a href="<?php echo URL?>ratings" class="ui-btn-active ui-state-persist">Rating</a></li>
		<li><a href="<?php echo URL?>matchs">Matchs</a></li>               
	</ul>
</div><!-- /navbar -->

        
        <h2>Ratings</h2>
        <table class="tables" >
            <tr class="headline"><td>User</td><td>Score</td></tr>
            <?php
            $ScoreData = $this->model->PrintHighScoreTable();

            $rowcount = 0;

            while ($matchdata = $ScoreData->fetch()) {

                $username = $matchdata['username'];
                $score = $matchdata['rating'];
                $rowcount += 1;
                if ($rowcount % 2 == 1)
                    echo"<tr class=\"alt\">\n";
                else
                    echo"<tr>\n";
                echo"<td>$username</td>\n";
                echo"<td>$score</td>\n";
                echo"</tr>\n";
            }
            ?>
        </table>
